package com.ia.aistream.service.operating.impl;

import java.util.List;

import com.ia.aistream.model.operating.entity.DocContentParagraph;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ia.aistream.mapper.operating.DocContentParagraphMapper;

import com.ia.aistream.service.operating.IDocContentParagraphService;
import com.ia.aistream.common.core.text.Convert;

/**
 * content_paragraphService业务层处理
 *
 * @author aistream
 * @date 2021-01-20
 */
@Service
public class DocContentParagraphServiceImpl implements IDocContentParagraphService
{
    @Autowired
    private DocContentParagraphMapper docContentParagraphMapper;

    /**
     * 查询content_paragraph
     *
     * @param id content_paragraphID
     * @return content_paragraph
     */
    @Override
    public DocContentParagraph selectDocContentParagraphById(Long id)
    {
        return docContentParagraphMapper.selectDocContentParagraphById(id);
    }

    /**
     * 查询content_paragraph列表
     *
     * @param docContentParagraph content_paragraph
     * @return content_paragraph
     */
    @Override
    public List<DocContentParagraph> selectDocContentParagraphList(DocContentParagraph docContentParagraph)
    {
        return docContentParagraphMapper.selectDocContentParagraphList(docContentParagraph);
    }

    /**
     * 新增content_paragraph
     *
     * @param docContentParagraph content_paragraph
     * @return 结果
     */
    @Override
    public int insertDocContentParagraph(DocContentParagraph docContentParagraph)
    {
        return docContentParagraphMapper.insertDocContentParagraph(docContentParagraph);
    }

//    @Override
//    public int insertDocContentParagraphList(List<DocContentParagraph> list) {
//        return docContentParagraphMapper.inserDocContentParagraphList(list);
//    }

    /**
     * 修改content_paragraph
     *
     * @param docContentParagraph content_paragraph
     * @return 结果
     */
    @Override
    public int updateDocContentParagraph(DocContentParagraph docContentParagraph)
    {
        return docContentParagraphMapper.updateDocContentParagraph(docContentParagraph);
    }

    /**
     * 删除content_paragraph对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteDocContentParagraphByIds(String ids)
    {
        return docContentParagraphMapper.deleteDocContentParagraphByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除content_paragraph信息
     *
     * @param id content_paragraphID
     * @return 结果
     */
    @Override
    public int deleteDocContentParagraphById(Long id)
    {
        return docContentParagraphMapper.deleteDocContentParagraphById(id);
    }
}
